﻿using System.ComponentModel.DataAnnotations.Schema;

namespace MachineVision.Service.Dto
{
    public class TemperatureRes
    {
        [Column(TypeName = "decimal(6,2)")]
        public decimal TemperatureC { get; set; }
        public double TemperatureF => Math.Round(32 + ((double)TemperatureC / 0.556), 2);
        public decimal Humidity { get; set; }

        public int Id { get; set; }
        public string? Description { get; set; }
        public string Date => DateOnly.FromDateTime(TempTime).ToString();
        public string Time => TimeOnly.FromDateTime(TempTime).ToString();
        public DateTime TempTime { get; set; }
        public DateTime CreateTime { get; set; }
        public string? Remarks { get; set; }
        public int? WorkPlace { get; set; }
    }
}
